home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / a86a.arc / INVOKE.DOC < prev    next >
Encoding:
Text File  |  1986-06-22  |  5.6 KB  |  104 lines

  1. ---INVOKE.DOC---
  2.  
  3. A86 Program Invocation
  4.  
  5. To invoke A86, you must provide a program invocation line, either typed to the
  6. console when the DOS command prompt appears, or included in a batch file.  The
  7. program invocation line consists of the following:
  8.  
  9. 1. The program name A86.
  10.  
  11. 2. The names of the source files you want to assemble.  You may use the wild-
  12.    card delimiters * and ? if you wish, to denote a group of source files to be
  13.    assembled.  A86 will sort all matching names into alphabetical order for
  14.    each wild-card specification; so the files will be assembled in the same
  15.    order even if they get jumbled up within a directory.
  16.  
  17.    A86 identifies the end of the source file names when it sees a name with no
  18.    extension, or a name with the default object-extension.  That extension is
  19.    .COM, unless you have assembled an ORG 0 statement; in which case the default
  20.    extension is .OBJ. Sorry, you cannot have a source file with the default
  21.    object extension.
  22.  
  23. 3. You may optionally provide the word TO, to separate the source file names
  24.    from the output file names.
  25.  
  26. 4. The name of the output program.  If you do not provide an extension, A86
  27.    will assume that you want the extension .COM (.OBJ if you had an ORG 0).
  28.    If you want your program file to have no extension, you end the file name
  29.    with a period.
  30.  
  31.    You have the option to omit both the program file name and the symbol table
  32.    file name from the invocation.  If you do so, A86 will output the program
  33.    source.COM (or source.OBJ) and the symbol table source.SYM; where "source"
  34.    is a name derived from the list of source files, according to the rules
  35.    described in the section "Strategies for Source File Maintenance" below.
  36.  
  37. 5. The name of the symbol-table file.  If you do not provide an extension, A86
  38.    will assume that you want the extension .SYM.  If you want your symbol table
  39.    file to have no extension, you end the file name with a period.
  40.  
  41.    You have the option to omit the name of the symbol table file.  If you do
  42.    so, A86 will use the same root as the output program name, with a .SYM
  43.    extension.  If you desire no symbol table file, specify "NUL.".  Be sure to
  44.    put a period after NUL, or else you will get a file called NUL.SYM.  (NUL is
  45.    the DOS "garbage can" device, which discards anything output to it.)
  46.  
  47.  
  48. Strategies for Source File Maintenance
  49.  
  50. A86 encourages modular programming, by letting you break your source into
  51. separate files, with complete impunity.  A86 has no concern whatsoever for
  52. file breaks-- it treats the sequence of files as a single source code stream.
  53.  
  54. You should build up libraries of source modules, containing commonly-used
  55. procedures.  Whenever you need the functionality of a procedure, you can simply
  56. include the appropriate source file in the list of files to be assembled.
  57.  
  58. You should consider one or more of the following strategies, which I have
  59. adopted in my source file management:
  60.  
  61. 1. I name all my A86 source files with the same extension, which is found on
  62.    no other files. The particular extension I have chosen is ".8". I did not
  63.    choose the more common .ASM; because I have a few source-files designed for
  64.    MSDOS's assembler.  If you don't like .8, I would suggest .A86.
  65.  
  66. 2. I keep a separate sub-directory on my hard disk for each multi-source-file
  67.    A86 program I have.  Then the simple command "A86 *.8" performs the assembly
  68.    for the current directory's program.
  69.  
  70. 3. I exploit the fact that A86 expands wild-cards into alphabetical order.
  71.    Whenever I want a source-file to be assembled first (e.g., when it contains
  72.    variable declarations), I append a decimal digit to the start of the file
  73.    name: 0 for the first file, 1 for the second, etc., for however many files
  74.    that need to be explicitly ordered.  If a file needs to come last, I append
  75.    a "Z" to the start of the file name.
  76.  
  77.    To accomodate the above strategy, I have programmed A86 to a somewhat
  78.    complicated algorithm for determining the default output file-name.  I use
  79.    the name of the first source file; but I truncate the first character if
  80.    it is a decimal digit.  However, you may have a library file that must come
  81.    first; so I have provided the following exception: if you have a source-file
  82.    whose name begins with the digit "9", that name (without the 9) is used.
  83.    If you don't like this, you can always explicitly give the program name you
  84.    want: "A86 *.8 MYPROG".
  85.  
  86. 4. If I have a source file used in more than one program, I do not want to have
  87.    more than one copy of that program exist on the disk for any amount of time.
  88.    There is a reason for this that is much more important than wasted space:
  89.    I wish any bug-fixes or enhancements to those files to be propagated to all
  90.    programs using those files.  I wish no confusion as to precisly which copy
  91.    is the latest version.
  92.  
  93.    There are two ways to accomplish the above-stated goal of one-copy-per-file.
  94.    First, I can make a .BAT file for assembling each program, that explicitly
  95.    lists the source files for that program, wherever they may be.  Or second,
  96.    I can make files GET.BAT and DEL.BAT.  GET.BAT temporarily copies the common
  97.    files from a library-directory into the program's directory.  I work on the
  98.    program; then when I am finished, DEL.BAT deletes the files, as well as
  99.    *.BAK, *.SYM, *.ERR, and *.OLD; leaving a clean directory.  If you wish to
  100.    have the option of modifying the library files, then you should have DEL.BAT
  101.    copy those files back to the library directories, before deleting them from
  102.    the local directory.
  103.  
  104.